home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibt40s1.arc / INITTEXT.MOD < prev    next >
Text File  |  1987-09-22  |  3KB  |  61 lines

  1. (*----------------------------------------------------------------------*)
  2. (*         Init_Text_Terminal --- Initialize text mode terminals        *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. PROCEDURE Init_Text_Terminal;
  6.  
  7. (*----------------------------------------------------------------------*)
  8. (*                                                                      *)
  9. (*     Procedure:  Init_Text_Terminal                                   *)
  10. (*                                                                      *)
  11. (*     Purpose:    Initializes text mode terminal emulations.           *)
  12. (*                                                                      *)
  13. (*     Calling Sequence:                                                *)
  14. (*                                                                      *)
  15. (*        Init_Text_Terminal;                                           *)
  16. (*                                                                      *)
  17. (*----------------------------------------------------------------------*)
  18.  
  19. BEGIN (* Init_Text_Terminal *)
  20.                                    (* Ensure we're in text mode *)
  21.    Do_Status_Time := FALSE;
  22.  
  23.                                    (* Pick up terminal name     *)
  24.  
  25.    Short_Terminal_Name := Terminal_Name_List[ ORD( Terminal_To_Emulate ) ];
  26.  
  27.    IF Current_Video_Mode = HiRes_GraphMode THEN
  28.       BEGIN
  29.          TextMode( Text_Mode );
  30.          IF EGA_Installed THEN
  31.             Set_EGA_Text_Mode( Max_Screen_Line );
  32.          Reset_Global_Colors;
  33.       END;
  34.  
  35.    Window( 1, 1, Max_Screen_Col, Max_Screen_Line );
  36.  
  37.    Save_Screen( Saved_Screen );
  38.    Draw_Menu_Frame( 10, 10, 55, 15, Menu_Frame_Color, Menu_Title_Color,
  39.                     Menu_Text_Color, '' );
  40.  
  41.    WRITELN('Beginning ',
  42.            Long_Terminal_Names[ ORD( Terminal_To_Emulate ) ], ' Emulation');
  43.    DELAY( One_Second_Delay );
  44.  
  45.    Restore_Screen( Saved_Screen );
  46.    Reset_Global_Colors;
  47.                                    (* Load function keys             *)
  48.    IF Auto_Load_FunKeys THEN
  49.       Load_Function_Keys( Short_Terminal_Name + '.FNC' );
  50.  
  51.                                    (* Scroll screen up if on last line *)
  52.  
  53.    IF ( WhereY = Max_Screen_Line ) THEN
  54.       BEGIN
  55.          GoToXY( WhereX , PRED( Max_Screen_Line ) );
  56.          Scroll( 1, Max_Screen_Line, 1, Max_Screen_Col, 1,
  57.                  ForeGround_Color, BackGround_Color );
  58.       END;
  59.  
  60. END   (* Init_Text_Terminal *);
  61.